<template>
  <div class="app-container">
    <div class="custom_card_0">
      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
        <el-form-item label="订单编号" prop="orderNo">
          <el-input
            v-model="queryParams.orderNo"
            placeholder="请输入订单编号"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="车牌号" prop="carNo">
          <el-input
            v-model="queryParams.carNo"
            placeholder="请输入车牌号"
            clearable
            size="small"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付时间" prop="applyTime">
          <el-date-picker clearable size="small"
                          v-model="time"
                          type="daterange"
                          value-format="yyyy-MM-dd"
                          start-placeholder="开始日期"
                          end-placeholder="结束日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="状态" prop="status">
          <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
            <el-option label="审核中" value="1"/>
            <el-option label="审核通过" value="2"/>
            <el-option label="审核拒绝" value="3"/>
          </el-select>
        </el-form-item>
        <el-form-item label="费用类型" prop="costType">
          <el-select v-model="queryParams.costType" placeholder="请选择费用类型" clearable size="small">
            <el-option
              v-for="type in costType"
              :key="type.id"
              :label="type.name"
              :value="type.id"
            />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
    </div>

    <div class="custom_card">
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            plain
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['bill:disburse:add']"
          >新增
          </el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            :loading="exportLoading"
            @click="handleExport"
            v-hasPermi="['bill:disburse:export']"
          >导出
          </el-button>
        </el-col>
      </el-row>

      <el-table v-loading="loading" :data="disburseList" @selection-change="handleSelectionChange" stripe
                :header-cell-style="{ background: '#eef1f6', color: '#606266' }" border>
        <template slot="empty">
          <el-empty :image-size="50" description="暂无财务支出费用"></el-empty>
        </template>
        <el-table-column label="订单编号" align="center" prop="orderNo"/>
        <el-table-column label="车牌号" align="center" prop="carNo"/>
        <el-table-column label="司机名称" align="center" prop="driverName">
          <template v-slot="{row}">
            {{row.driverName||'--'}}
          </template>
        </el-table-column>
        <el-table-column label="支付时间" align="center" prop="applyTime" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="录入人" align="center" prop="applyUserName"/>
        <el-table-column label="金额" align="center" prop="amount"/>
        <el-table-column label="状态" align="center" prop="status">
          <template slot-scope="scope">
            <span>{{ scope.row.status == 1 ? scope.row.auditName : statusVal(scope.row.status) }}</span>
          </template>
        </el-table-column>
        <el-table-column label="费用类型" align="center" prop="costType">
          <template slot-scope="{row}">
            <span v-if="row.disburseType ==2">
             代驾费
            </span>
            <span v-else>
              {{ costTypeVal(row.costType) }}
            </span>
          </template>
        </el-table-column>
        <el-table-column label="备注" align="center" prop="applyNote"/>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              @click="handleDetailsShow(scope.row)"
            >详情
            </el-button>
            <el-button
              size="mini"
              type="text"
              v-show="scope.row.status==3"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['bill:disburse:edit']"
            >修改
            </el-button>
            <el-button
              size="mini"
              type="text"
              v-show="scope.row.auditBut==1"
              @click="handleAudit(scope.row)"
            >审核
            </el-button>
            <el-button
              size="mini"
              type="text"
              v-show="scope.row.status==3"
              @click="handleDelete(scope.row)"
              v-hasPermi="['bill:disburse:remove']"
            >删除
            </el-button>
          </template>
        </el-table-column>
      </el-table>

      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>

    <!-- 添加或修改财务支出费用对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-row :gutter="16">
          <el-col :span="24">
            <el-form-item label="支出类型">
              <el-radio-group v-model="form.disburseType">
                <el-radio :label="1">其他费用支出</el-radio>
                <el-radio :label="2">代驾支出</el-radio>
              </el-radio-group>

            </el-form-item>
          </el-col>
          <el-col :span="24" v-if="form.disburseType==1">
            <el-form-item label="选择车辆" prop="carNo">
              <div @click="showCarPage">
                <el-input style="width: 300px;" v-model="form.carNo" placeholder="请选择车辆" clearable readonly>
                  <el-button slot="append">选择</el-button>
                </el-input>
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="订单号" prop="orderNo">
              <div @click="showOrderClick">
                <el-input style="width: 300px;" v-model="form.orderNo" placeholder="请选择订单" clearable readonly>
                  <el-button slot="append">选择</el-button>
                </el-input>
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="车型" prop="modelName" v-show="form.orderNo">
              <el-input style="width: 300px;" v-model="form.modelName" clearable readonly>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="租赁时间" prop="orderNo" v-show="form.orderNo">
              <el-input style="width: 300px;" v-model="form.leaseTime" clearable readonly>
              </el-input>
            </el-form-item>
          </el-col>
          <template v-if="form.disburseType==1">
            <el-col :span="12">
              <div v-if="form.useTimeType">
                <el-form-item label="租期" prop="orderNo" v-show="form.orderNo">
                  <el-input style="width: 300px;" v-model="form.leaseDays" clearable readonly>
                  </el-input>
                </el-form-item>
              </div>
              <div v-else>
                <el-form-item label="租赁天数" prop="orderNo" v-show="form.orderNo">
                  <el-input style="width: 300px;" v-model="form.leaseDays" clearable readonly>
                  </el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="24">
              <el-form-item label="费用类型" prop="costType">
                <el-select style="width: 300px;" v-model="form.costType" placeholder="请选择费用类型">
                  <el-option v-for="(item, index) in costType" :key="index" :label="item.name" :value="item.id"/>
                </el-select>
              </el-form-item>
            </el-col>
          </template>
          <template v-else-if="form.orderNo">
            <el-col :span="12">
              <el-form-item label="车牌号" prop="driverType">
                <el-input style="width: 300px;" v-model="form.carNo" clearable readonly>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="司机名称" prop="driverType">
                <el-input style="width: 300px;" v-model="form.driverName" clearable readonly>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="代驾时长" prop="orderNo">
                  <el-input style="width: 300px;" v-model="form.drivingDuration" clearable readonly>
                  </el-input>
                </el-form-item>
            </el-col>
          </template>
          <el-col :span="12">
            <el-form-item label="支出时间" prop="applyTime">
              <el-date-picker clearable size="small"
                              v-model="form.applyTime"
                              type="datetime"
                              value-format="yyyy-MM-dd HH:mm:ss"
                              placeholder="选择申请时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="金额" prop="amount">
              <el-input style="width: 300px;" v-model="form.amount" placeholder="请输入金额"/>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注" prop="applyNote">
              <el-input
                v-model="form.applyNote"
                type="textarea"
                placeholder="请输入备注"
                maxlength="200"
                show-word-limit
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
    <select-car v-model="showCarBox" @success="selectCarInfo"></select-car>
    <select-order ref="selectOrder" @success="selectOrderInfo"></select-order>
    <select-charter-order ref="selectCharterOrder" @success="selectCharterOrder"></select-charter-order>
    <!--审核    -->
    <el-dialog
      :title="auditTitle"
      :visible.sync="openShow"
      append-to-body
      width="900px"
    >
      <el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="120px">
        <el-row>
          <el-col :span="24">
            <el-form-item label="审核" prop="status">
              <el-radio-group v-model="auditForm.auditStatus" size="medium">
                <el-radio :label="2">审核通过
                </el-radio>
                <el-radio :label="3">审核拒绝
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12" style="height: 58px; overflow: hidden">
            <el-form-item label="审核时间" prop="auditTime">
              <el-date-picker clearable size="small"
                              v-model="auditForm.auditTime"
                              type="datetime"
                              value-format="yyyy-MM-dd HH:mm:ss"
                              placeholder="选择审核时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <!--          <el-col :span="24">
                      <el-form-item label="审核附件" prop="auditUrl">
                        <ImageUpload
                          @on-success="managerUrlSuccess"
                          v-model="auditForm.auditUrl"
                          :limit="6"
                          @on-remove="managerUrlRemove"
                        />
                      </el-form-item>
                    </el-col>-->
          <el-col :span="24" style="height: 58px; overflow: hidden">
            <el-form-item label="审核备注" prop="remark">
              <el-input
                v-model="auditForm.remark"
                type="textarea"
                placeholder="请输入备注"
                maxlength="200"
                show-word-limit
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitAuditForm">确 定
        </el-button>
        <el-button @click="openShow=false">取 消</el-button>
      </div>
    </el-dialog>
    <!--  详情  -->
    <el-dialog
      title="详情"
      :visible.sync="openDetailsShow"
      append-to-body
      width="900px"
    >
      <el-tabs type="border-card" v-model="activeName">
        <el-tab-pane label="基础信息" name="first">
          <el-form :model="formDetails" label-width="120px">
            <el-row>
              <el-col :span="12">
                <el-form-item label="订单编号">
                  {{ formDetails.orderNo }}
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="车牌号">
                  {{ formDetails.carNo }}
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="车型">
                  {{ formDetails.modelName }}
                </el-form-item>
              </el-col>
              <template v-if="formDetails.disburseType=2">
                <el-col :span="12">
                  <el-form-item label="司机名称">
                    {{ formDetails.driverName }}
                  </el-form-item>
                </el-col>
<!--                <el-col :span="12">-->
<!--                  <el-form-item label="代驾时长">-->
<!--                    {{ formDetails.drivingDuration }}-->
<!--                    &lt;!&ndash;                  天&ndash;&gt;-->
<!--                  </el-form-item>-->
<!--                </el-col>-->
              </template>
              <template v-else>
                <el-col :span="12">
                  <el-form-item label="租赁时间">
                    {{ formDetails.leaseTime }}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="租期">
                    {{ formDetails.leaseDays }}
                    <!--                  天-->
                  </el-form-item>
                </el-col>
              </template>
              <el-col :span="12">
                <el-form-item label="申请时间">
                  {{ formDetails.applyTime }}
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="申请金额">
                  {{ formDetails.amount }}元
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="申请人">
                  {{ formDetails.applyUserName }}
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="状态">
                  {{ formDetails.status == 1 ? formDetails.auditName : statusVal(formDetails.status) }}
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="费用类型">
                  <span>
                     {{parseInt(formDetails.disburseType,2)? '代驾费' : costTypeVal(formDetails.costType)}}
                  </span>

                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="申请备注">
                  {{ formDetails.applyNote }}
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-tab-pane>
        <el-tab-pane label="审核记录" name="second">
          <span v-if="!formDetails.auditInfoList">暂无审核记录</span>

          <el-timeline>
            <el-timeline-item
              v-for="(item, index) in formDetails.auditInfoList"
              :key="index"
              v-if="item.auditStatus !=1"
              color="#0bbd87"
              :timestamp="item.auditTime">
              <span v-if="item.nodeId!=0">审核人：{{ item.auditName }}  {{ statusVal(item.auditStatus) }}  审核意见：{{ item.auditNote || '--' }} </span>
              <span v-if="item.nodeId==0">发起：{{ item.auditName }} </span>
            </el-timeline-item>
            <el-timeline-item
              v-for="(item, index) in formDetails.auditInfoList"
              :key="index"
              v-if="item.auditStatus ==1"
              :timestamp="item.auditTime">
              <span>{{ formDetails.auditName }} </span>
            </el-timeline-item>
            <el-timeline-item v-if="formDetails.auditInfoList && formDetails.status==3">审核完成</el-timeline-item>
          </el-timeline>
        </el-tab-pane>
      </el-tabs>

      <div slot="footer" class="dialog-footer">
        <el-button @click="openDetailsShow=false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listDisburse,
  getDisburse,
  delDisburse,
  addDisburse,
  updateDisburse,
  exportDisburse,
  costAudit
} from "@/api/bills/disburse";
import selectCar from "@/views/components/selectCar.vue";
import selectOrder from "../component/selectOrder.vue"
import selectCharterOrder from "../component/selectCharterOrder.vue"
import order from "@/views/shujudaping/order";

export default {
  name: "Disburse",
  components: {selectCar, selectOrder, selectCharterOrder},
  data() {
    return {
      showCarBox: false,
      showOrderBox: false,
      openShow: false,
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      openDetailsShow: false,
      formDetails: [],
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 财务支出费用表格数据
      disburseList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      auditTitle: '审核',
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        orderNo: null,
        carId: null,
        carNo: null,
        applyTime: null,
        applyUserId: null,
        applyUserName: null,
        applyNote: null,
        amount: null,
        status: null,
        tenantId: null,
        deptId: null,
        costType: null,
        startTime: null,
        endTime: null
      },
      auditForm: {},
      time: [],
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        carNo: [
          {required: true, message: '请选择车辆', trigger: 'change'},
        ],
        costType: [
          {required: true, message: '请选择费用类型', trigger: 'change'},
        ],
        applyTime: [
          {required: true, message: '请选择支出时间', trigger: 'change'},
        ],
        amount: [{
          required: true,
          message: '请输入申请金额',
          trigger: 'change'
        }, {
          pattern: /^(([1-9][0-9]*)|(([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2})))$/,
          message: '申请金额输入有误',
          trigger: 'blur',
        }],
      },
      activeName: 'first',
      costType: [
        {"id": 1, "name": "加油费"},
        {"id": 2, "name": "过路费"},
        {"id": 3, "name": "停车费"},
        {"id": 4, "name": "收发车补贴"},
        {"id": 5, "name": "手续费"},
        {"id": 6, "name": "托运费"},
        {"id": 7, "name": "车损费"},
        {"id": 8, "name": "提成费用"},
        {"id": 9, "name": "其他费用"},
      ]
    };
  },
  created() {
    this.getList();
  },
  methods: {
    //详情
    handleDetailsShow(row) {
      this.openDetailsShow = true;
      this.activeName = 'first';
      getDisburse(row.id).then(response => {
        this.formDetails = response.data;
      })
    },
    //审核
    handleAudit(row) {
      this.auditReset();
      getDisburse(row.id).then(response => {
        this.auditForm.disburseId = row.id;
        this.openShow = true;
        this.auditTitle = row.auditName;
        this.auditForm.auditStatus = 2;
        this.auditForm.auditTime = new Date();
        this.auditForm.remark = '';
        this.auditForm.auditUrl = null;
      });
    },
    auditReset() {
      this.auditForm = {
        id: null,
        auditStatus: null,
        auditTime: null,
        remark: null,
        auditUrl: null,
        disburseId: null,
      };
      this.resetForm("auditForm");
    },
    showCarPage() {
      // 当多次切换车辆,清空之前选择的订单
      if (this.form.orderNo) {
        this.form.orderNo = '';
      }
      this.showCarBox = true;
    },
    // 选择车辆
    selectCarInfo(carInfo) {
      this.form.carNo = carInfo.carNo;
      this.form.carId = carInfo.carId;
      this.showCarBox = false;
    },
    showOrderClick() {

      if (this.form.disburseType == 2) {//代驾支出
        this.$refs.selectCharterOrder.show();
      } else {
        if (this.form.carNo) {
          this.$refs.selectOrder.show(this.form.carNo, 1);
        } else {
          this.$modal.msgError("请选择车辆");
        }
      }
    },
    //选择日租订单
    selectOrderInfo(orderInfo) {
      console.log("选择的车辆订单信息：", orderInfo);
      this.form.orderNo = orderInfo.orderNo;
      this.form.modelName = orderInfo.modelName
      this.form.leaseTime = orderInfo.rentalStartTime + ' 至 ' + orderInfo.rentalEndTime
      this.form.leaseDays = orderInfo.leaseDays
      if (orderInfo.useTimeType) {
        this.form.leaseDays = 1
        this.form.useTimeType = orderInfo.useTimeType
      }
      this.showOrderBox = false;
    },
    //选择包车订单
    selectCharterOrder(orderInfo) {
      this.form.orderNo = orderInfo.orderNo;
      this.form.modelName = orderInfo.modelName
      this.form.leaseTime = orderInfo.rentalStartTime + ' 至 ' + orderInfo.rentalEndTime
      this.form.driverName = orderInfo.driverName;
      this.form.driverId = orderInfo.driverId;
      this.form.carNo = orderInfo.carNo;
      this.form.drivingDuration=orderInfo.drivingDuration;
      this.form.costType = 10;
      this.form.recordsId= orderInfo.id;

    },
    /** 查询财务支出费用列表 */
    getList() {
      if (this.time.length > 0) {
        this.queryParams.startTime = this.time[0];
        this.queryParams.endTime = this.time[1];
      }
      this.loading = true;
      listDisburse(this.queryParams).then(response => {
        this.disburseList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        orderNo: null,
        carId: null,
        carNo: null,
        applyTime: null,
        applyUserId: null,
        applyUserName: null,
        applyNote: null,
        amount: null,
        status: 0,
        tenantId: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
        delFlag: null,
        deptId: null,
        costType: null,
        modelName: null,
        leaseTime: null,
        useTimeType: null,
        tenancyTerm: null,
        leaseDays: null,
        startTime: null,
        endTime: null,
        driverId:null,
        driverName:null,
        drivingDuration:null,
        disburseType:1,
        recordsId:null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.time = [];
      this.queryParams.startTime = null,
        this.queryParams.endTime = null
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "新增支出费用";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getDisburse(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改财务支出费用";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateDisburse(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addDisburse(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除财务支出费用编号为"' + ids + '"的数据项？').then(function () {
        return delDisburse(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$modal.confirm('是否确认导出所有财务支出费用数据项？').then(() => {
        this.exportLoading = true;
        return exportDisburse(queryParams);
      }).then(response => {
        this.$download.name(response.msg);
        this.exportLoading = false;
      }).catch(() => {
      });
    },
    costTypeVal(costType) {
      let obj = this.costType.find((item) => {//model就是上面的数据源
        return item.id === costType;//筛选出匹配数据
      });
      if (obj) {
        return obj.name;
      }
      return '--';
    },
    // 删除经理审核图片
    managerUrlRemove(file) {
      this.auditForm.auditUrl = null
    },
    // 上传成功经理审核图片回调
    managerUrlSuccess(res) {
      this.auditForm.auditUrl = res.fileName
      this.$refs['auditForm'].validateField('auditUrl')
    },
    //审核
    submitAuditForm() {
      this.$refs["auditForm"].validate(valid => {
        if (valid) {
          this.auditForm.auditTime = this.parseTime(this.auditForm.auditTime, '{y}-{m}-{d} {h}:{i}:{s}')
          costAudit(this.auditForm).then(response => {
            this.$modal.msgSuccess("审核成功");
            this.openShow = false;
            this.getList();
          });
        }
      });
    },
    //审核转换
    statusVal(status) {
      if (status == 1) {
        return '审核中'
      }
      if (status == 2) {
        return '审核完成'
      }
      if (status == 3) {
        return '审核拒绝'
      }
      return '--';
    }
  }
};
</script>
